/* -----------------
* brief
* 1. this is code gen by tools
* 2. array like [a,b,c] after each field, define the ui html tag in view,
		a for title,
		b for show or not ,
		c for element html tag , currently support : check、radio、select、input、textarea、upload
* 3. XXX
*/

package appmanager

import (
	"github.com/mjiulee/lego"
	"saas_sys_base/common"
	"time"
)

func init() {
	lego.AddBeanToSynList(new(AppTenantPermission))
}

/* table: "tb_app_tenant_permission"
 * -----------------
 */
type AppTenantPermission struct {
	Id    int64  `xorm:"pk" json:",string"`               // ["id","hide","hidden"]
	IfDel int    `xorm:"default 0"`        // ["deleted","hide","hidden"]
	Cdate string `xorm:"DateTime created"` // ["create","show","datetime"]
	Udate string `xorm:"DateTime updated"` // ["update","show","datetime"]
	// add your custom field here
	MiniAppId int64 `xorm:"unique(grp_id)" json:",string"` // ["mini app id","show","input"]
	TenantId  int64 `xorm:"unique(grp_id)" json:",string"` // ["tenant id","show","input"]
	//Uid int64  `xorm:""`                  // ["uid","show","input"]

	CheckMode    common.CHECK_MODE       `xorm:"default 0"` // ["权限校验模式","hide","hidden"]
	ExpireTime   time.Time `xorm:"DateTime"`  // ["到期时间","show","datetime"]
	UseTimes     int       `xorm:"default 0"` // ["剩余次数","show","input"]
	ForceDisable int       `xorm:"default 0"` // ["是否禁用","show","datetime"]
}
